package com.zhangdy.agent.enums;

public enum RuleTypeEnum {


    JAVA_CLASS(0, "java class"),
    JAVA_CODE_BLOCK(1, "java code block"),

    ;


    private final int type;
    private final String desc;


    RuleTypeEnum(int type, String desc ){
        this.type = type;
        this.desc = desc;
    }

    public static RuleTypeEnum getByType(int value){
        for (RuleTypeEnum ruleEnum : values()) {
            if (ruleEnum.getType() == value) {
                return ruleEnum;
            }
        }
        return null;
    }

    public int getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }
}
